<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<!--<link href="__PUBLIC__/css/ydh.css" rel="stylesheet" id="lhgdialoglink">-->
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="renderer" content="webkit">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>三鑫灯世界 - 加盟店</title>

	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/public_style.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style_log.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/header.css"/>
	<script type="text/javascript" src="__PUBLIC__/js/jquery-1.8.3.min.js"></script>
	<script src="__PUBLIC__/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>

	<style type="text/css">
		.tygSearch_box {
			background: url(__PUBLIC__/img/tyg_sbg.jpg) no-repeat center;
			width: 1200px;
			height: 232px;
			margin: 0 auto;
			padding-top: 108px;
		}
		.tygSearch_box_list {
			padding: 24px 0px;
			background-color: rgba(255, 149, 3, 0.2);
			background: rgba(255, 149, 3, 0.2);
			/*margin: 0 200px;*/
			width: 720px;
			float: left;
			height: 118px;
		}
		.tygSearch_box_list .title {
			font-size: 24px;
			color: #013ca6;
			text-align: center;
			line-height: 32px;
			margin-bottom: 14px;
			overflow: hidden;
		}
		.tygSearch_box_list .sl_address {
			padding-left: 55px;
			padding-top: 5px;
		}
		*{box-sizing:content-box;}


		.bg_f0f0e8{background: #f0f0e8;}
		.container { width: 1200px!important; max-width: none!important; padding: 0; margin: 0 auto;background: #f0f0e8;}
		.container:before, .container:after { display: table; line-height: 0; content: ""; }
		.joinerApply_box, .tygList_box, .tyg_newsProBox { width: 1200px; margin: 0 auto; padding-bottom: 46px; overflow: hidden; }
		.tygTitle { margin: 24px 0 16px; overflow: hidden; text-align: center; }
		.tygTitle h1 { font-size: 24px; color: #013ca6; font-weight: 400; margin-bottom: 10px; }
		.tygTitle .title span { color: #999; font-size: 18px; padding: 0 12px; }
		.joinList { overflow: hidden; }
		.joinList ul { float: left; width: 600px; }
		.joinList li { width: 496px; float: left; margin: 0 52px 14px; position: relative; }
		.joinList li em { display: block; float: left; width: 94px; text-align: right; color: #ae8370; font-size: 14px; font-family: "宋体"; line-height: 42px; }
		address, em, i { font-style: normal; }
		li { line-height: 20px; }
		li { display: list-item; text-align: -webkit-match-parent; }
		ol, ul { list-style: none; margin: 0; padding: 0; }
		.joinList li .mes { padding-left: 94px; height: 62px; }
		.joinList li .mes .inputTxt { background-color: #fff; font-size: 14px; border-radius: 3px; width: 234px; height: 28px; border: 1px solid #ccc; padding: 6px 10px; margin-right: 14px; }
		.joinList li .mes .hint_error_tips { color: #013ca6; line-height: 24px; }
		em, p { font-size: 12px; margin: 0; }
		.joinList li .mes span { color: #ae8370; font-size: 14px; }
		.checkbox { display: inline-block; margin-right: 32px; padding-left: 0; cursor: pointer; }
		.file { position: absolute; display: inline-block; background: #ff9503; border: none; font-size: 16px; border-radius: 5px; height: 42px; line-height: 42px; padding: 0 12px; overflow: hidden; color: #fff; }
		.file input { position: absolute; font-size: 100px; right: 0; top: 0; opacity: 0; -moz-opacity: 0; -khtml-opacity: 0; filter: alpha(opacity=0); }
		.joinList li .mes .hint_error_tips { color: #013ca6; line-height: 24px; }
		.joinerApply_submit { clear: both; text-align: center; margin-top: 32px; }
		.apply_btn { text-align: center;background-color: #013ca6; border: none; color: #fff; padding: 10px 10px; border-radius: 5px; font-size: 16px; cursor: pointer; }
		.tygSearch_box_list ul li .btn { border-color: #ccc; height: 42px; line-height: 42px; font-size: 14px; background: #fff; }
		.btn:hover, .btn:active, .btn:focus { color: #666; background-color: transparent; border-color: #666; }
		.sl_address li a:hover { background: #f0f0e8; }
	</style>
<body class="bg_f0f0e8">
<!--	头部  shop_pavilion.html-->
<include file="Public:head2"/>

<div class="tygSearch_box">
	<if condition="session('user_id') eq ''">
		<div class="tygSearch_box_list" style="margin-top:52px;">
	<else />
		<div class="tygSearch_box_list" style="margin-top:52px;margin-left: 18%;">
	</if>
		<div class="title">体验馆——快速查询</div>
		<ul class="sl_address">
			<li>
				<div class="dropdown">
					<button class="btn wd140 dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
						<span class="txt ShengName" id="province">请选择省份</span>
						<span class="caret"></span>
					</button>
					<ul id="provinceUl" class="dropdown-menu pavSheng" aria-labelledby="dropdownMenu1">
						<volist name="province_list" id="v">
							<li data-pid="{$v.id}"><a href="javascript:;">{$v.name}</a></li>
						</volist>
					</ul>
				</div>
			</li>
			<li>
				<div class="dropdown">
					<button class="btn wd140 dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown">
						<span class="txt ShiName" id="city">请选择城市</span>
						<span class="caret"></span>
					</button>
					<ul id="cityUl" class="dropdown-menu pavShi" aria-labelledby="dropdownMenu2">

					</ul>
				</div>
			</li>
			<li class="wd250">
				<div class="dropdown">
					<button class="btn wd290 dropdown-toggle" type="button" id="dropdownMenu3" data-toggle="dropdown">
						<span class="txt" id="pavilion">请选择加盟店</span>
						<span class="caret"></span>
					</button>
					<ul id="pavilionUl" class="dropdown-menu mgPav" aria-labelledby="dropdownMenu3">

					</ul>
				</div>
			</li>
		</ul>
	</div>

	<if condition="session('user_id') eq ''">
		<div class="login_boder" style="width: 300px;float: right">

		<div class="login_padding" id="login_model" style="margin-top: 20px;">

			<label>
				<input type="text" id="phone" class="txt_input txt_input2" placeholder="请输入手机号" style="width:200px;">
			</label>
			<label>
				<input type="password" name="textfield2" id="password" class="txt_input" value="" placeholder="请输入密码" style="width:200px;">
			</label>

			<!-- 验证码end-->
			<div class="forgot" style="line-height: 26px;clear:both">
				<div class="rem_sub_l" style="display: inline-block;">
				</div>
				<a id="iforget" href="zhaohui.html" style="float: right;">忘记密码？</a>
			</div>
			<div class="rem_sub" style="margin-right: 32px;text-align: center">
				<input type="submit" class="sub_button" name="button" onclick="login('user')" id="login" value="经&nbsp;&nbsp;销&nbsp;&nbsp;商&nbsp;&nbsp;登&nbsp;&nbsp;录" style="opacity: 0.8;width: 57%;background: #5F9FEA;float:none;padding: 0 20px;width:100%">
			</div>
		</div>
		<script>
            var verify =document.getElementById('verify');
            verify.onclick=function () {
                this.src=this.src+'?'+Math.random();
            }

            function login(type) {
                var type = type;
                var phone = $('#phone').val();
                var password = $('#password').val();
                $.ajax({
                    url:"{:U('dealer_logining')}",
                    data:{'usertype':type,'phone':phone,'password':password},
                    type:'post',
                    success:function (e) {
                        if(e == 1){
                            window.location.href="{:U('index')}";
                        }else if(e == -1){
                            $('#yzm').css('display','block');
                            verify.click()
                        }else if(e == 3){
                            alert('该用户被禁用，请联系网站管理员');
                        }else{
                            alert('用户名或密码错误');
                        }
                    }
                })
            }

            //登录键盘事件
            $(function() {
                $(document).keydown(function (event) {
                    if (event.keyCode == 13) {
                        login('user');
                    }
                });
            })
		</script>

		<!--login_padding  Sign up end-->
	</div>
	</if>
</div>

<div class="bg_f0f0e8">
	<div class="container">
		<div class="joinerApply_box">
			<div class="tygTitle">
				<h1>招商加盟申请</h1>
				<div class="title"><i class="ico_tit_l"></i> <span>抢先占领市场</span> <i class="ico_tit_r"></i></div>
			</div>
			<div class="joinList">
				<form method="post" action="{:U('apply_join')}" class="ajax-form" enctype="multipart/form-data" onsubmit="return required()">
					<ul>
						<li><em>您的姓名：</em><div class="mes"><input class="inputTxt jmsname" type="text" name="user_name" required> <p class="hint_error_tips">请问您贵姓？</p></div></li>
						<li><em>手机号码：</em><div class="mes"><input class="inputTxt jmstel" type="text" name="phone" required><p class="hint_error_tips">请输入正确的手机号码，方便工作人员联系到您。</p></div></li>
						<li><em>详细地址：</em><div class="mes"><input class="inputTxt jmsaddr" type="text" name="address_detailed" required><p class="hint_error_tips">请输入详细地址，方便工作人员联系到您。</p></div></li>
					</ul>
					<ul>
						<li><em>实体店铺：</em>
							<div class="mes">
										<span class="checkbox jmsdy selected">
											<!--<i class="check_ic"></i>-->
											<input type="radio" name="real_store" value="1" id="checked" class="require" style="width: 16px; height: 16px;vertical-align: sub;"/>
											有
										</span>
										<span class="checkbox jmsdw">
											<input type="radio" name="real_store" value="0" class="require" checked/>
											无
										</span>
							</div>
						</li>
						<li><em>店铺面积：</em><div class="mes"><input class="inputTxt wd904 jmsmj add" type="text" name="store_area"><span>㎡</span><p class="hint_error_tips"></p></div></li>
						<li><em>店铺照片：</em>
							<div class="mes">
								<input class="inputTxt filePath" type="text">
								<a href="javascript:;" class="file">选择文件<input type="file" name="store_picture" id="f1"></a>
								<p class="hint_error_tips">店铺照片大小低于2M，仅支持JPG、GIF、PNG、JPEG、BMP格式。</p>
							</div>
						</li>
					</ul>
			</div>
			<div class="joinerApply_submit"><input class="apply_btn mgapplybtn" type="submit" value="提交申请"></div>
			</form>
		</div>
	</div>
</div>

<!--底部 -->
<include file="Public:footer"/>
</body>
<script>
	$('.require').click(function () {
		if($(this).val() == 1){
			$('.add').attr('required','required');
		}else{
			$('.add').removeAttr('required','required');
		}
	});

	function required() {
		if($('#f1').val().length == 0 && $('#checked').is(':Checked')){
			alert('请选择店铺照片文件');
			return false;
		}
	}
</script>
<script>
	$('.side-nav').find('.side-ul').hide();
	$('.side-nav').hover(function(){
		$(this).find('.side-ul').show();
	},function(){
		$(this).find('.side-ul').hide();
	})
	$('.side-ul> li').hover(function(){
		$(this).css('background','#fff').find('a:first-child').css('color','#000');
		$(this).find('.nav-items').show();
	},function(){
		$(this).css('background','#4f4f4f').find('a:first-child').css('color','#fff');
		$(this).find('.nav-items').hide();
	})
</script>
<script type="text/javascript">
	$('#provinceUl li').click(function(){
		$('#province').text($(this).text());
		$.ajax({
			type:"post",
			url:"{:U('citys')}",
			data:{province:$(this).attr('data-pid')},
			success:function(data){
				var data = JSON.parse(data);
				$('#city').text(data[0].name);
				var list = '';
				for(var i=0;i<data.length;i++){
					list += '<li data-pid='+data[i].id+' class="addrc"><a href="javascript:;">'+data[i].name+'</a></li>';
				}
				$('#cityUl').html(list);
			}
		});
	})

	$(document).on('click','#cityUl li',function(){
		$('#city').text($(this).text());
		$.ajax({
			type:"post",
			url:"{:U('dealer_list')}",
			data:{city:$(this).attr('data-pid')},
			success:function(data){
				var data = JSON.parse(data);
				$('#pavilion').text(data[0].name);
				var list = '';
				for(var i=0;i<data.length;i++){
					list += '<li class="mgpav">'
							+'<a href="{:U(shop_pavilion)}?id='+data[i].id+'">'+data[i].store_name+'</a>'
							+'</li>';
				}
				$('#pavilionUl').html(list);
			}
		});
	})
</script>
<script>
	$(function() {
		$("#f1").change(function() {
			$(".filePath").val($("#f1").val());
		});
	});
</script>
</html>
